﻿<local:MyPage
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
	x:Class="ConstellationShow.Doc"
    xmlns:local="clr-namespace:ConstellationShow"
	FontFamily="{StaticResource PhoneFontFamilyNormal}"
	FontSize="{StaticResource PhoneFontSizeNormal}"
	Foreground="{StaticResource PhoneForegroundBrush}" toolkit:TiltEffect.IsTiltEnabled="False"
	SupportedOrientations="Portrait" Orientation="Portrait" 
	shell:SystemTray.IsVisible="True">

    <local:MyPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" BackgroundColor="#FF7F49D1" ForegroundColor="{StaticResource PhoneInverseBackgroundColor}">
            <shell:ApplicationBarIconButton x:Name="appbar_button1" Click="Click_Share" IconUri="/Images/i_share.png" Text="分享"/>
        </shell:ApplicationBar>
    </local:MyPage.ApplicationBar>

    <local:MyPage.Resources>
        <DataTemplate x:Key="DataTemplate1">
            <Grid>
                <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding}" d:LayoutOverrides="Height" Foreground="#FF6624C1" Width="46"/>
            </Grid>
        </DataTemplate>
        <Style x:Key="ButtonStyle1" TargetType="Button">
        	<Setter Property="Template">
        		<Setter.Value>
        			<ControlTemplate TargetType="Button">
        				<Grid>
        					<Canvas Margin="0,0,151,134">
        						<Image Height="156" Source="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" Stretch="Fill" Width="155"/>
        						<TextBlock Canvas.Left="64" TextWrapping="Wrap" Text="{TemplateBinding CommandParameter}" Canvas.Top="125" Foreground="Black" FontSize="16" Width="80" TextAlignment="Right"/>
        						<TextBlock TextWrapping="Wrap" Text="{TemplateBinding Content}" Foreground="Black" FontSize="16" Canvas.Left="12" Canvas.Top="125"/>
        					</Canvas>
        				</Grid>
        			</ControlTemplate>
        		</Setter.Value>
        	</Setter>
        	<Setter Property="FontSize" Value="16"/>
        	<Setter Property="Foreground" Value="Black"/>
        </Style>
    </local:MyPage.Resources>

    <!--LayoutRoot 是放置所有页面内容的根网格-->
	<Grid x:Name="LayoutRoot">
		<Grid.Background>
			<ImageBrush Stretch="Fill" ImageSource="/Images/blackground.jpg"/>
		</Grid.Background>
		<!--透视控件-->
        <controls:Pivot x:Name="piv" Title="档案" TitleTemplate="{StaticResource DataTemplate1}">
            <controls:Pivot.HeaderTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding}"  Foreground="#FF6624C1" FontSize="50"/>
                </DataTemplate>
            </controls:Pivot.HeaderTemplate>
            
            <!--透视项目一-->
			<controls:PivotItem Header="传说">
				<ListBox Name="list1">
					<Grid Width="456">
						<Button x:Name="img1" HorizontalAlignment="Right" Content="狮子座"
						Tag="/Images/icon_07.png" CommandParameter="3.21-4.19"
						 Height="156" Margin="0,8,8,0" Style="{StaticResource ButtonStyle1}" VerticalAlignment="Top" Width="155"/>
						<TextBlock x:Name="txt1" Margin="8,6,167,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="#1d1d1d" FontSize="24" Height="162"/>
					</Grid>
				</ListBox>
			</controls:PivotItem>

 			<!--透视项目二-->
			<controls:PivotItem Header="起源">
				<ListBox x:Name="list2">
					<Grid Width="456">
						<Button x:Name="img2" HorizontalAlignment="Right" Content="狮子座"
							Tag="/Images/icon_07.png" CommandParameter="3.21-4.19"
							Height="156" Margin="0,8,8,0" Style="{StaticResource ButtonStyle1}" VerticalAlignment="Top" Width="155"/>
						<TextBlock x:Name="txt2" Margin="8,6,167,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="#1d1d1d" FontSize="24" Height="162"/>
					</Grid>
				</ListBox>
			</controls:PivotItem>

            <controls:PivotItem Header="男生">
            	<ListBox x:Name="list3">
            		<Grid Width="456">
            			<Button x:Name="img3" HorizontalAlignment="Right" Content="狮子座"
            				Tag="/Images/icon_07.png" CommandParameter="3.21-4.19"
            				Height="156" Margin="0,8,8,0" Style="{StaticResource ButtonStyle1}" VerticalAlignment="Top" Width="155"/>
            			<TextBlock x:Name="txt3" Margin="8,6,167,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="#1d1d1d" FontSize="24" Height="162"/>
            		</Grid>
            	</ListBox>
            </controls:PivotItem>

            <controls:PivotItem Header="女生">
            	<ListBox x:Name="list4">
            		<Grid Width="456">
            			<Button x:Name="img4" HorizontalAlignment="Right" Content="狮子座"
            				Tag="/Images/icon_07.png" CommandParameter="3.21-4.19"
            				Height="156" Margin="0,8,8,0" Style="{StaticResource ButtonStyle1}" VerticalAlignment="Top" Width="155"/>
            			<TextBlock x:Name="txt4" Margin="8,6,167,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="#1d1d1d" FontSize="24" Height="162"/>
            		</Grid>
            	</ListBox>
            </controls:PivotItem>

            <controls:PivotItem Header="爱情">
            	<ListBox x:Name="list5">
            		<Grid Width="456">
            			<Button x:Name="img5" HorizontalAlignment="Right" Content="狮子座"
            				Tag="/Images/icon_07.png" CommandParameter="3.21-4.19"
            				Height="156" Margin="0,8,8,0" Style="{StaticResource ButtonStyle1}" VerticalAlignment="Top" Width="155"/>
            			<TextBlock x:Name="txt5" Margin="8,6,167,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="#1d1d1d" FontSize="24" Height="162"/>
            		</Grid>
            	</ListBox>
            </controls:PivotItem>

            <controls:PivotItem Header="性格">
            	<ListBox x:Name="list6">
            		<Grid Width="456">
            			<Button x:Name="img6" HorizontalAlignment="Right" Content="狮子座"
            				Tag="/Images/icon_07.png" CommandParameter="3.21-4.19"
            				Height="156" Margin="0,8,8,0" Style="{StaticResource ButtonStyle1}" VerticalAlignment="Top" Width="155"/>
            			<TextBlock x:Name="txt6" Margin="8,6,167,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="#1d1d1d" FontSize="24" Height="162"/>
            		</Grid>
            	</ListBox>
            </controls:PivotItem>
        </controls:Pivot>
	</Grid>
</local:MyPage>